Driver Behaviour topic
Use the driver behaviour module to capture and analyze driving sessions, producing trip summaries, safety metrics, and detected driving events. This system enables building driver coaching, fleet monitoring, and safety reporting experiences by exposing session management, scoring, and event models.
DriverBehaviour: Use this session manager to record and manage driving analyses. It coordinates data capture, optional map-matching, and session lifecycle so you can start, stop, and review driving recordings reliably. Also provides access to previous sessions for historical analysis.DriverBehaviourAnalysis: Use this session-level summary to access aggregated metrics and event counts for a completed recording. Analyses include trip duration, distance, incident counts (e.g., hard braking and acceleration, cornering), and optional embedded scores and events for reporting.DrivingScores: Use this compact score model to quantify risk and performance across categories like speed, braking, and cornering. Scores help prioritize coaching, alerts, and filtering of sessions by safety level.MappedDrivingEvent: Use this event model to represent detected driving incidents with spatial and temporal context. Events provide the data needed to render timelines and map overlays so users can see where and when incidents occurred.
These components combine to provide accurate, actionable driving analytics: DriverBehaviour collects sessions, DriverBehaviourAnalysis summarizes outcomes, DrivingScores quantifies risk, and MappedDrivingEvent supplies contextual incidents for visualization. Together they make it straightforward to build reporting, visualization, and coaching workflows with consistent metrics and reliable mapping context.
Typical workflow: start a recording with DriverBehaviour, stop and finalize the session to produce a DriverBehaviourAnalysis, then inspect DrivingScores and MappedDrivingEvent lists for reports and UI visualizations. Prefer centralized session managers for app-level aggregation and use lightweight consumers in UI components to avoid heavy processing on the main thread.
Learn more about driver behaviour: https://developer.magiclane.com/docs/flutter/guides/driver-behaviour
Classes
- DriverBehaviour Driver Behaviour
- Manager for driver behaviour analysis: start/stop sessions and retrieve results.
- DriverBehaviourAnalysis Driver Behaviour
- Analysis results for a single driver behaviour session.
- DrivingScores Driver Behaviour
- Driving scores for a driving session.
- MappedDrivingEvent Driver Behaviour
- Represents a mapped driving event detected during a driving session.
Enums
- DrivingEvent Driver Behaviour
- Driving event types detected during a driving session.